[wechall] enlightment

Flow Chart

digraph foo {
    a -> b;

    a [shape=box, label="or"];
    b [shape=box, label="xor"];
}

or

or 계산결과 특정 접속 페이지가 나옵니다.

r = '''000000000110000001100000000000000000000001000000
000100000000000001110000001001000010000001101001
000100000000000000101001011001010110010000100000
000000000000000001010100000000000110001000100001
001011000110000001010000001000000010100100000010
000000000000000000001001000000100111010000100001
010000000110000101000010000101000110000101000110
001000000010000000000100000000100001011100000101
011010000010100000100000011001000000000100000000
010000100010111000000000011101000000001000100000
000101000110000001000001001000000000011000100100
010110000111010000100000001000110111010001000001
001001110100010000001100000000000100011000100011
001000000111010001001000011000010101000001000101
001100100000100100001010000000000010000100000000
000100000011000100100001001100000011000000010000
000100010010000000000000001000010000000000100000
001100010001000000000000000000000010000000110000
000000010001000000010001000000000001000000110001
000000000000000100110000000000000010000000001101
000010000001000000010000001000000010000000110000
000000010000000000000001001000000001000100100000
000100000010000100010001000000010001000000110000
000100010011000000000000000100010000000000000000
000100000000000000000001001000010000000000110000
001100010000000000110000000010000000000000000000
000000000001000100110000001000000001000100000000
001100000001000000100001001100000001000000100000
001100000011000000010001001000000010000000010000
000100000010000000000000000000000001000000100000
000100000011000000010001000000000010000000010000
000100000000100000001000001000000011000000010000
000100000000000000000000000100000011000000000000
001100010010000100010001000000000001000000000000
000000000011000000010001001100010011000000000001
001100000001000000110000000000000001000000010001
001100000001000000110000000000000001000000000001
00000000'''

g = '''010000010110100000100000000000000000000000000001
011001000000000001000000001001000100010000000100
001000100000000000111001010001100110000000000000
001001010100110000100000000000000011001101001001
011000000010010100000000010000000010100000100110
011001100010000001101000010001000100000001000101
001100100010000000100000001100000010100101100000
000001010000000100001000000010000101011100100001
010001000100110000100000010000000010011000000000
011000000000110100000000000100000110111000100000
011000000010000001000100000000000110110001000101
000100000011000000000000001100000001000001100001
011000000110010100001100000000000100010101000101
001000000000010001101000000001010111001001100100
000000000000110100000000001100000000000000010000
001100000000000000110000000100000000000000010000
000100000000000100010000001100000001000000010000
000000000001000000010001001100000001000000110000
001100000010000100100000000100000001000100000001
001100000001000100100000000100000011000000001000
000000100010000000110000000100010001000000010000
001000000011000000010000000100000011000000010000
000000000001000000010001001100000010000100110000
001000000001000000110000001000000011000000110000
000100000001000000110001000100010011000000100000
000000010000000000000000000001000000001000110000
001000010011000100100000001100000010000100010001
000000000000000000000000001000010010000000010000
001000000000000000000001000100000001000000100001
001000000010000000110000000000000011000000000000
000100000010000100110001001100000000000000110001
000100000000110000001000000100000001000000000001
000100000011000100010001000000010010000000110000
001000010010000000110000000000000001000000100000
001100000010000000100001001000000000000000010000
001000000011000000000000001100000011000100010001
001100000010000000010000001100000000000000001000
00001000'''

b = '''010000010100000001100001001000010010000000001000
010001000010000001010011011000010110000101000001
011000110010000001100000010011010001000100000000
011000110010001100110100001000000101001100101110
010010010110000101100100001010000110100001101100
001000010000000000100000001010100001000000100101
000100000000010000010011010001000000000001101100
010001100000000100000101000010000000000101100101
011001000110000000100000001100000100111100100000
010001010100101000100000010001000000101100100000
001000000000100000100000000000000110010001100000
011010000010000000000000010000000010000001100000
000001010000010100101000001000000010011100001110
001000000011000000001000000001000001001000000100
000010100000010000001010000100000001000100100000
000000000001000000000000000000000011000000100000
001000000001000000100000001000010011000000100000
001100010011000000100000000000010001000000100000
000100010000000000010001001000000011000100000000
000000000011000000010000001000000001000000001001
000010000000000000000000001000000000000100010000
001100000001000100100001001100000010000000010000
001000010010000000110000001100000010000100110000
000000000000000000100000001100000000000100110000
001000000011000000100000001100000000000000000000
001100010011000000010001000001010000100000000000
000100010010000100000001000100000010000000100000
001100000011000000010000000100000010000000110000
001100010010000000110000000000000010000100100000
001000000001000100010001001100000000000000010000
001000000010000100100001000100000011000000110000
001000000000010100000010001000000000000000110000
001000000001000100100000001100000000000000110000
000100000001000100100000001100000011000000110000
001000000010000000000001000100010011000000100000
000100000011000000000000000000000000000000100000
000000010010000000000000000000000010000000001100
00001010'''


r = r.replace('\n','')
g = g.replace('\n','')
b = b.replace('\n','')

all_or = ''
for i,j,k in zip(r,g,b):
    all_or += str(int(i,2)|int(j,2)|int(k,2))

or_str = ''
for l in range(len(all_or)/8):
    or_str += chr(int(all_or[8*l:8+8*l],2))

or_str = '''01001100011010010110011101101000
00110111010111110100110001100101
01110110011001010110110000110010
00101110011100000110100001110000'''

or_str = or_str.replace('\n','')

or_str2 = ''
for m in range(len(or_str)/8):
    or_str2 += chr(int(or_str[8*m:8+8*m],2))


print or_str2

xor

xor 계산결과 정답이 출력됩니다.

r = '''001111111000110110000110001011110011010010000000
110100111001010001010101010110000000101111110010
011100010011110001101000000010100101010101011110
100101001001100000100000001000010000111001010110
110011000110011011000010101010010001100111011110
011011011100101001101100100000110001010101001111
100100100100100011000000000001100101001100110000
110111000000001101010101100110101110000100100011
100011000100011010001011011011101101110000001000
110001011100000110011100110010001010100110010100
001111001101000001001111000111010100000000100000
110010000110110110010101011101101101110101111110
101110110110000101100000000100000000100110010100
100111000100010000100111001110011000000010100110
101111101010000100001111101110110100110100000010
000101110100010010001001100001011111101011001000
110000001001101011000100010101100111000010000110
110010111011001100000001000100001000010010000010
10011001010000100011100101011110'''

g = '''001000111110001110011011010011010000001011011110
101000001110000110100010001001011111010110011011
100001010100011000010001010110010010100110000010
101010110011011101000111011100100000010000111010
001110001000101010010000110001111100011100100001
000110101001011000011110001000101000011001000111
111000011010010010110000001000010001110100001000
100000011000100011010001101011000001110101000100
101110110000001101001001110110110011011110011101
101011110000100100110001000100011000000001011001
000000010010011110000100100110100001000101000100
010101010101001000000000011110011101010011011001
110100001000100000000110001101111010000001000000
111100101010100001001000001101110001101001001001
110001111101001100001100001000100100001010010000
110000010011000111001100001110101000011000111100
001100011010011110100010010110000000110111111101
111000010000100110011100110000001110110000111001
10000100101100011100101011101100'''

b = '''010010000001110001110100000100100101101000111011
010111100010110111011010001100101010110001000101
110101000000100000010000001101000001010010101000
000000001010001001101101000101000111100000001001
100101011001100001110011010011101001011010011010
000001010011100101010010110010001110000000101000
000001001000010000010001010100110110111001000001
001100101111111010100100010001011001010000001000
010000100010100110100110100101011000100111110000
010010101010010011000010101101100100001010100100
010100111001000011101011111000010011111000010110
101100110001000110111011000000100000001110000101
001011001000000000001011010010101100110010001011
001010101000110100110000010000101111001110001000
000100010000011000100001100101000000010111110111
101110000000000100100000110011010101110010000000
100110010101010000010101001011100001110000001000
000010101100101011111100101000110001101111001100
01110010100000011001011110010011'''


r = r.replace('\n','')
g = g.replace('\n','')
b = b.replace('\n','')

all_or = ''
for i,j,k in zip(r,g,b):
    all_or += str(int(i,2)^int(j,2)^int(k,2))

or_str = ''
for l in range(len(all_or)/8):
    or_str += chr(int(all_or[8*l:8+8*l],2))


print or_str